server {
        listen 80;
        server_name xx;
        index index.html index.htm index.php default.php default.htm default.html;
        root /var/www/html;
        access_log /dev/null;
        error_log /dev/null;
        location /xray {
                if ($http_upgrade != "websocket") {
                        return 404;
                }
                proxy_redirect off;
                proxy_pass http://127.0.0.1:60002;       
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

server {
        listen 127.0.0.1:60000 proxy_protocol;
        listen 127.0.0.1:60001 http2 proxy_protocol;
        server_name xx;
        index index.html index.htm index.php default.php default.htm default.html;
        root /var/www/html;
        add_header Strict-Transport-Security "max-age=63072000" always;
        access_log /dev/null;
        error_log /dev/null;
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
                expires 30d;
                error_log off;
        }
        location ~ .*\.(js|css)?$ {
                expires 12h;
                error_log off;
        }
}